package com.spider.im.chat.model;

import lombok.Getter;
import lombok.Setter;
import lombok.NoArgsConstructor;
import lombok.AllArgsConstructor;

import java.time.LocalDateTime;

@Getter
@Setter
@NoArgsConstructor
@AllArgsConstructor
public class ChatGroupUser {
    private Long id; // 唯一标识符
    private Long chatGroupId; // 聊天组ID
    private Long userId; // 用户ID
    private String userStatus; // 用户状态（例如：ACTIVE、INACTIVE）
    private UserRole userRole; // 用户角色（群主、副群主、成员）
    private LocalDateTime createdAt; // 创建时间
    private LocalDateTime updatedAt; // 更新时间


    public ChatGroupUser(Long chatGroupId, Long userId, String userStatus, UserRole userRole, LocalDateTime createdAt, LocalDateTime updatedAt) {
        this.chatGroupId = chatGroupId;
        this.userId = userId;
        this.userStatus = userStatus;
        this.userRole = userRole;
        this.createdAt = createdAt;
        this.updatedAt = updatedAt;
    }

    // 用户角色枚举
    public enum UserRole {
        OWNER, // 群主
        DEPUTY_OWNER, // 副群主
        MEMBER // 成员
    }
}
